<layout name="../../../resource/master" />
<section class="vbox">
    <section>
        <section class="hbox stretch">
            <!-- /.aside -->
            <section id="content">
                <section class="vbox">
                    <section class="scrollable padder">
                        <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
                            <li><a href=""><i class="fa fa-home"></i> 首页</a></li>
                            <li class="active">分类管理</li>
                        </ul>
                        <section class="panel panel-default">
                            <header class="panel-heading">
                                分类管理
                            </header>
                            <div class="row wrapper">
                                <div class="col-sm-4 m-b-xs">
                                    <a href="{:u('add',['tid'=>$_GET['tid']])}" class="btn btn-default btn-sm">添加分类</a>
                                </div>
                            </div>
                            <div class="table-responsive">
                                <table class="table table-striped b-t b-light">
                                    <thead>
                                    <tr>
                                        <td>分类ID</td>
                                        <td>分类名称</td>
                                        <td>分类排序</td>

                                        <td>操作</td>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <volist name="data" id="vo">
                                        <tr>
                                            <td>{$vo['cid']}</td>
                                            <td>{$vo['_cname']}</td>
                                            <td>{$vo['rank']}</td>

                                            <td>
                                                <div class="btn-group ">
                                                    <a href="{:U('category/set',['cid'=>$vo['cid']])}" class="btn btn-info btn-xs ">添加子分类</a>

                                                    <a href="{:u('edit',['cid'=>$_GET['cid'],'cid'=>$vo['cid']])}" class="btn btn-success btn-xs">编辑</a>
                                                    <a href="javascript:;" onclick="del({$vo['cid']})" class="btn btn-danger btn-xs del">删除</a>
                                                </div>
                                            </td>
                                        </tr>
                                    </volist>
                                    </tbody>
                                </table>
                            </div>
                            <div class="pagination pagination-sm pull-right">

                            </div>
                        </section>
                    </section>
                </section>
            </section>
        </section>
    </section>
</section>

<script>
    function del(cid) {
//    alert(1);
    util.confirm('确定删除吗?',function(){
    location.href = "{:u('admin/Category/del')}"+'?cid='+cid;
    })
    }
</script>
